import json
import sqlite3

f = open("/Users/mac/Desktop/gitlearn/data/database/imagess.json")
conn = sqlite3.connect("/Users/mac/Desktop/gitlearn/data/database/images.db")
cur = conn.cursor()
cur.execute('create table if not exists images(id integer primary key autoincrement, url text not null);')
jsondic = json.load(f)

for dic in jsondic:
	print dic['url']
	sql = "insert into images values(NULL,'%s')" % dic['url']
	cur.execute(sql)

conn.commit()
conn.close()
